package org.dromara.openApi.report.controller;

import jakarta.annotation.Resource;
import org.dromara.common.core.domain.R;
import org.dromara.common.web.core.BaseController;
import org.dromara.openApi.report.domain.bo.OpenApiStoreAchievementBo;
import org.dromara.openApi.report.domain.vo.OpenApiStoreAchievementVo;
import org.dromara.openApi.report.service.IOpenApiReportService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 东云区域门店
 *
 * @author wdm
 * @date 2024-02-28
 */
@Validated
@RestController
@RequestMapping(value = "/openApi/report",name = "报表服务")
public class OpenApiReportController extends BaseController {

    @Resource
    private IOpenApiReportService openApiReportService;


    /**
     * 查询东云区域门店列表
     */
    @PostMapping(value = "/storeAchievementList",name = "门店业绩")
    public R<List<OpenApiStoreAchievementVo>> list(@RequestBody OpenApiStoreAchievementBo bo) {
        List<OpenApiStoreAchievementVo> list = openApiReportService.storeAchievementList(bo);
        return R.ok(list);
    }

}
